package member

import "time"

type MemberStruct struct {
	Id           uint      `json:"id" gorm:"type:int(10) unsigned auto_increment; NOT NULL; primary_key"`
	Mobile       string    `json:"mobile" gorm:"type:varchar(20); COMMENT:'手机号码'"`
	Type         int       `json:"type" gorm:"type:int(11); NOT NULL; COMMENT:'会员类型 1固定会员 2临时停车'"`
	RealName     string    `json:"real_name" gorm:"type:varchar(20); COMMENT:'会员名称'"`
	Avatar       string    `json:"avatar" gorm:"type:varchar(255); COMMENT:'头像'"`
	ExpiresTime  time.Time `json:"expires_time" gorm:"type:datetime; COMMENT:'过期时间'"`
	Remarks      string    `json:"remarks" gorm:"type:varchar(100); COMMENT:'备注'"`
	State        int       `json:"state" gorm:"type:tinyint(1); COMMENT:'账号状态 1正常 2禁用 3过期'"`
	AccountType  int       `json:"account_type" gorm:"type:tinyint(1); COMMENT:'账号类型 1钉钉 2微信'"`
	AccountExtId int       `json:"account_ext_id" gorm:"type:int(11); COMMENT:'账号扩展id'"`
	CreatedAt    time.Time `json:"created_at" gorm:"type:datetime"`
	UpdatedAt    time.Time `json:"updated_at" gorm:"type:datetime"`
	Money        float64   `json:"money" gorm:"type:decimal(10,2); COMMENT:'可用余额'"`
	IsVip        int8      `json:"is_vip" gorm:"type:tinyint(1); COMMENT:'是否vip 1是 0否'"`
}

func (c *MemberStruct) TableName() string {
	return "member"
}
